<%@ page import= "com.google.gdata.client.http.AuthSubUtil"%>
<%@ page import= "com.google.gdata.util.AuthenticationException"%>

<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Untitled Document</title>
    </head>

    <body>
        <p>Selecione um arquivo no seu pc para ser enviado ao Google Docs.</p>
        <%
                String requestUrl = AuthSubUtil.getRequestUrl("http://localhost:8084/GDocs/upload",
                "http://docs.google.com/feeds/", false, true);
                String suggestAuthorization = "<p>Este Aplicativo Precisa acessar sua Conta Google. " +
                    "Para autorizar, <a href=\"" + requestUrl + "\"> acesse sua conta</a>.</p>";
        %>
        <p><%=suggestAuthorization%></p>
        <form id="form1" name="form1" method="post" action="upload">
            Arquivo:
            <input name="txtArquivo" type="text" id="txtArquivo" size="100" maxlength="100" />
            <input type="submit" name="btEnviar" id="btEnviar" value="Enviar" />
        </form>
    </body>
</html>